<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${message("admin.review.list")}</title>


<link href="${base}/resources/admin/css/amazeui.css" rel="stylesheet" type="text/css" />
<link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />

</head>
<body>
	<div class="path">
		<a href="${base}/asl-admin/common/index.htm">首页</a> &raquo; 评价列表 <span>(${message("admin.page.total", page.total)})</span>
	</div>
	<form id="listForm" action="list.htm" method="get">
		<input type="hidden" id="type" name="type" value="${type}" />
		<div class="bar">
            <a href="add.htm" class="iconButton" id="addButton">
                <i class="iconfont icon-anonymous-iconfont1">&nbsp;</i>${message("admin.common.add")}
            </a>
			<div class="buttonWrap">
				<a href="javascript:" id="deleteButton" class="iconButton disabled">
					<i class="iconfont icon-icon27">&nbsp;</i>${message("admin.common.delete")}
				</a>
				<a href="javascript:" id="refreshButton" class="iconButton">
					<i class="iconfont icon-shuaxin1">&nbsp;</i>${message("admin.common.refresh")}
				</a>
				<div class="menuWrap">
					<a href="javascript:" id="pageSizeSelect" class="button">
						${message("admin.page.pageSize")}<span class="arrow">&nbsp;</span>
					</a>
					<div class="popupMenu">
						<ul id="pageSizeOption">
							<li>
								<a href="javascript:"[#if page.pageSize == 10] class="current"[/#if] val="10">10</a>
							</li>
							<li>
								<a href="javascript:"[#if page.pageSize == 20] class="current"[/#if] val="20">20</a>
							</li>
							<li>
								<a href="javascript:"[#if page.pageSize == 50] class="current"[/#if] val="50">50</a>
							</li>
							<li>
								<a href="javascript:"[#if page.pageSize == 100] class="current"[/#if] val="100">100</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<div class="menuWrap">
				<div class="search">
					<span id="searchPropertySelect" class="arrow">&nbsp;</span>
					<input type="text" id="searchValue" name="searchValue" value="${page.searchValue}" maxlength="200" placeholder="请输入搜索条件"/>
					<button type="submit">&nbsp;</button>
				</div>
				<div class="popupMenu">
					<ul id="searchPropertyOption">
						<li>
							<a href="javascript:"[#if page.searchProperty == "course.title"] class="current"[/#if] val="course.title">课程标题</a>
						</li>
                        <li>
                            <a href="javascript:"[#if page.searchProperty == "member.username"] class="current"[/#if] val="member.username">会员</a>
                        </li>
					</ul>
				</div>
			</div>
		</div>
		<table id="listTable" class="list">
			<tr>
				<th class="check">
					<input type="checkbox" id="selectAll" />
				</th>
				<th>
					<a href="javascript:" class="sort">课程标题</a>
				</th>
				<th>
					<a href="javascript:" class="sort">会员</a>
				</th>
				<th>
					<a href="javascript:" class="sort">服务分</a>
				</th>
				<th>
					<a href="javascript:" class="sort">方案分</a>
				</th>
				<th>
					<a href="javascript:" class="sort">真实情况反馈分</a>
				</th>
				<th>
					<a href="javascript:" class="sort">评价内容</a>
				</th>
                <th>
                    <a href="javascript:" class="sort">创建日期</a>
                </th>
				<th>
					<span>操作</span>
				</th>
			</tr>
			[#list page.content as review]
				<tr>
					<td>
						<input type="checkbox" name="ids" value="${review.id}" />
					</td>
                    <td>
						[#if review.course??]
							${review.course.title}
						[/#if]
                    </td>
					<td>
						[#if review.member??]
							${review.member.username}(${review.member.name})
						[#else]
							${message("admin.review.anonymous")}
						[/#if]
					</td>
					<td>
						${review.serviceScore}
					</td>
                    <td>
						${review.schemeScore}
                    </td>
                    <td>
						${review.feedbackScore}
                    </td>
					<td>
						<span title="${review.content}">${abbreviate(review.content, 50, "...")}</span>
					</td>
					<td>
						${review.createDate?string("yyyy-MM-dd HH:mm:ss")}
					</td>
					<td>
						<a href="edit.htm?id=${review.id}"><i class="iconfont icon-bianji edit-icon" ></i></a>
					</td>
				</tr>
			[/#list]
		</table>
		[@pagination pageNumber = page.pageNumber totalPages = page.totalPages]
			[#include "/admin/include/pagination.ftl"]
		[/@pagination]
	</form>
</body>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/list.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/amazeui.min.js"></script>
<script type="text/javascript">
    $().ready(function() {

        var $listForm = $("#listForm");
        var $type = $("#type");
        var $typeSelect = $("#typeSelect");
        var $typeOption = $("#typeOption a");

	[@flash_message /]

        $typeSelect.mouseover(function() {
            var $this = $(this);
            var offset = $this.offset();
            var $menuWrap = $this.closest("div.menuWrap");
            var $popupMenu = $menuWrap.children("div.popupMenu");
            $popupMenu.css({left: offset.left, top: offset.top + $this.height() + 2}).show();
            $menuWrap.mouseleave(function() {
                $popupMenu.hide();
            });
        });

        $typeOption.click(function() {
            var $this = $(this);
            $type.val($this.attr("val"));
            $listForm.submit();
            return false;
        });

    });
</script>
</html>